<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input data-rule="required" class="form-control hidden" name="row[id]" type="text" value="{$row.id|htmlentities}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Serial')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-serial" data-rule="required" class="form-control" name="row[serial]" type="text" value="{$row.serial|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-thumb" data-rule="required" class="form-control" name="row[thumb]" type="text" value="{$row.thumb|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumb" data-rule="required" class="form-control" size="50" name="row[thumb]" type="text" value="{$row.thumb|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-introduce" class="btn btn-danger plupload" data-input-id="c-thumb" data-multiple="true" data-preview-id="p-thumb" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" ><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                     <span><button type="button" id="fachoose-thumb" class="btn btn-primary fachoose" data-input-id="c-thumb" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumb"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-thumb"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Summary')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-summary" class="form-control" name="row[summary]" type="text" value="{$row.summary|htmlentities}">-->
            <textarea id="c-summary" class="form-control " rows="5" name="row[summary]" cols="50">{$row.summary|htmlentities}</textarea>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Createtime')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-createTime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[createTime]" type="text" value="{:$row.createTime?datetime($row.createTime):''}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-category" data-rule="required" class="form-control" name="row[category]" type="number" value="{$row.category|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category')}:</label>
        <div class="col-xs-12 col-sm-4">
            <select id="c-category" class="form-control selectpicker" name="row[category]">
                <option value="0">请选择</option>
                {foreach name="categoryList" item="vo"}
                    <option value="{$key}"  {in name="key" value="$row.category"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-tags" data-rule="required" class="form-control" name="row[tags]" type="number" value="{$row.tags|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
        <div class="col-xs-12 col-sm-4">
            <select id="c-tags" class="form-control  selectpicker" name="row[tags][]"  data-live-search="true" multiple>
                {foreach name="AtagsList" item="vo"}
                    <option value="{$key}"  {in name="key" value="$row.tags"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
<!--            <input id="c-status" class="form-control" name="row[status]" type="number" value="{$row.status|htmlentities}">-->
            {:build_radios('row[status]', ['1'=>__('series_status 1'), '0'=>__('series_status 0')], $row['status']);}
        </div>
    </div>



    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('售卖信息')}:</label>

        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="basictpl" data-name="row[basic]">
                <dd>
                    <ins>{:__('入场券名称')}</ins>
                    <ins>{:__('入场券价格')}(¥)</ins>
                    <ins>{:__('数量')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[basic]" class="form-control hidden" cols="30" rows="5">{$row['tlist']}</textarea>
            </dl>
            <script id="basictpl" type="text/html">
                <dd class="form-inline">
                    <input  name="row[ticket_id][]" class="form-control hidden"  value="<%=row.id%>"/></ins>
                    <ins><input type="text" name="row[ticket_name][]" class="form-control" value="<%=row.name%>" placeholder="入场券名称" size="20"/></ins>
                    <ins><input type="text" name="row[ticket_price][]" class="form-control" value="<%=row.price%>" placeholder="价格"/></ins>
                    <ins><input type="text" name="row[ticket_number][]" class="form-control" value="<%=row.number%>" placeholder="数量"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
